package cn.lyn4ever.tool;

import com.alibaba.fastjson.JSON;

/**
 * 微信公众号 “小鱼与Java”
 *
 * @date 2020/4/18
 * @auther Lyn4ever
 */
public class Tool {


    public static Object formatObj(Object origin, Class res) {
        String s = JSON.toJSONString(origin);
        return JSON.parseObject(s, res);
    }
}
